<app-time (Time)='timeChange($event)'></app-time>
<div class="my-table-top-new">
  <div style='width:150px'>
    <nz-input [(ngModel)]="user_name" [nzPlaceHolder]="'请输入用户名'"></nz-input>
  </div>
  <div style="width: 150px;">
    <nz-select style='width:140px'  [nzPlaceHolder]="'请选择类型'" [(ngModel)]="selectedOptio" [nzShowSearch]="true" nzAllowClear>
      <nz-option *ngFor="let option of options" [nzLabel]="option.label" [nzValue]="option.value" [nzDisabled]="option.disabled">
      </nz-option>
    </nz-select>
  </div>
  <div style='width:60px'>时间范围</div>
  <div style='width:145px'>
    <nz-datepicker [(ngModel)]="startTime" [nzPlaceHolder]="'开始日期'" ></nz-datepicker>
  </div>
  <div style='width:30px'>至</div>
  <div style='width:145px'>
    <nz-datepicker [(ngModel)]="endTime" [nzPlaceHolder]="'结束日期'" ></nz-datepicker>
  </div>
  <div class='m-left'>
    <span class="gm-button gm-button-success d-bc" (click)="getList()">查询</span>
  </div>

</div>

<div class="my-table-content">
  <nz-table #nzTable [nzDataSource]="listData" [nzIsPagination]="false" [nzBordered]="true">
    <thead nz-thead>
      <tr>
        <th nz-th>
          <span>记录时间</span>
        </th>
        <th nz-th>
          <span>用户名</span>
        </th>
        <th nz-th>
          <span>当前金额</span>
        </th>
        <th nz-th>
          <span>支出</span>
        </th>
        <th nz-th>
          <span>收入</span>
        </th>
        <th nz-th>
          <span>可用金额</span>
        </th>
        <th nz-th>
          <span>备注</span>
        </th>
      </tr>
    </thead>
    <tbody nz-tbody>
      <tr nz-tbody-tr *ngFor="let item of nzTable.data">
        <td ng-td>{{item.addTime*1000 | date:'yyyy-MM-dd HH:mm:ss'}}</td>
        <td ng-td>{{item.user_name}}</td>
        <td ng-td>{{item.usableAmountBefore | number:'1.2-2'}}</td>
        <td ng-td>{{item.usable>0?item.usable: '0.00' | number:'1.2-2'}}</td>
        <td ng-td>{{item.usable<=0?-item.usable:'0.00' | number:'1.2-2'}}</td>
        <td ng-td>{{item.usableAmount | number:'1.2-2'}}</td>
        <td ng-td>{{item.intro}}</td>
      </tr>
    </tbody>
  </nz-table>
</div>
<div class="my-pagination-right">
  <nz-pagination (click)='clickPagination()' [(nzPageIndex)]="page" [nzTotal]="total"></nz-pagination>
</div>
